import java.util.HashMap;
import java.util.Map;
// 系统管理（管理员功能）
public class SystemManagement {
    private Map<String, User> users = new HashMap<>(); // 模拟用户数据存储
    private Map<String, Nailist> nailists = new HashMap<>(); // 模拟美甲师数据存储
    private Map<String, NailService> services = new HashMap<>(); // 模拟美甲服务数据存储
    // 添加用户
    public boolean addUser(String userId, String username, String email) {
        if (users.containsKey(userId)) {
            System.out.println("Error: User ID already exists.");
            return false;
        }
        User newUser = new User(userId, username, email);
        users.put(userId, newUser);
        return true;
    }
    // 删除用户
    public boolean removeUser(String userId) {
        if (!users.containsKey(userId)) {
            System.out.println("Error: User ID does not exist.");
            return false;
        }
        users.remove(userId);
        return true;
    }
    // 禁用用户
    public boolean disableUser(String userId) {
        if (!users.containsKey(userId)) {
            System.out.println("Error: User ID does not exist.");
            return false;
        }
        User user = users.get(userId);
        user.setActive(false);
        return true;
    }
    // 添加美甲师
    public boolean addNailist(String nailistId, String name, String specialty) {
        if (nailists.containsKey(nailistId)) {
            System.out.println("Error: Nailist ID already exists.");
            return false;
        }
        Nailist newNailist = new Nailist(nailistId, name, specialty);
        nailists.put(nailistId, newNailist);
        return true;
    }
    // 删除美甲师
    public boolean removeNailist(String nailistId) {
        if (!nailists.containsKey(nailistId)) {
            System.out.println("Error: Nailist ID does not exist.");
            return false;
        }
        nailists.remove(nailistId);
        return true;
    }
    // 禁用美甲师
    public boolean disableNailist(String nailistId) {
        if (!nailists.containsKey(nailistId)) {
            System.out.println("Error: Nailist ID does not exist.");
            return false;
        }
        Nailist nailist = nailists.get(nailistId);
        nailist.setActive(false);
        return true;
    }
    // 添加美甲服务
    public boolean addNailService(String serviceId, String name, double price) {
        if (services.containsKey(serviceId)) {
            System.out.println("Error: Service ID already exists.");
            return false;
        }
        NailService newService = new NailService(serviceId, name, price);
        services.put(serviceId, newService);
        return true;
    }
    // 删除美甲服务
    public boolean removeNailService(String serviceId) {
        if (!services.containsKey(serviceId)) {
            System.out.println("Error: Service ID does not exist.");
            return false;
        }
        services.remove(serviceId);
        return true;
    }
    // 内部类，用于模拟用户
    private class User {
        private String userId;
        private String username;
        private String email;
        private boolean active;
        public User(String userId, String username, String email) {
            this.userId = userId;
            this.username = username;
            this.email = email;
            this.active = true; // 默认激活状态
        }
        public void setActive(boolean active) {
            this.active = active;
        }
    }
    // 内部类，用于模拟美甲师
    private class Nailist {
        private String nailistId;
        private String name;
        private String specialty;
        private boolean active;
        public Nailist(String nailistId, String name, String specialty) {
            this.nailistId = nailistId;
            this.name = name;
            this.specialty = specialty;
            this.active = true; // 默认激活状态
        }
        public void setActive(boolean active) {
            this.active = active;
        }
    }
    // 内部类，用于模拟美甲服务
    private class NailService {
        private String serviceId;
        private String name;
        private double price;
        public NailService(String serviceId, String name, double price) {
            this.serviceId = serviceId;
            this.name = name;
            this.price = price;
        }
    }
}